#ifndef TANK_H_
#define TANK_H_

#include "../Widget.h"
#include "../Event.h"
#include "Label.h"
#include "TankStatus.h"

#define PI 3.14159265

class Tank: public Widget {

private:

	std::string owner;
	
	Label* lblName;

	int nextX;

	int nextY;

	bool goingForward;

	bool goingBackwards;

	bool turningLeft;

	bool turningRight;

	bool shooting;

	SDL_Surface* tankSurface;

	int angle;

	//Indica si es el tanque local o no
	bool flaged;

protected:

	Tank();

public:

	Tank(SDL_Surface* surface,int posX, int posY, Widget* parent, std::string owner,int angle = 0,bool flaged = false);

	virtual void handleEvent(Event event);

	virtual void resolve();

	virtual void showOn(SDL_Surface* surface);

	std::string getOwner();

	int getbulletX();
	int getbulletY();
	int getBulletAngle();

	TankStatus getTankStatus();
	void updateStatus(DTOCliente* cliente);

	void updateFlag();

	virtual ~Tank();
};

#endif /* TANK_H_ */
